package com.wm.alltest.controller;

import com.wm.alltest.req.UserTestReq;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.*;

/**
 *@ClassName TestController
 *@Author 半卷流年
 *@Date 2020/10/16 10:10
 */
@RestController
@RequestMapping("/user")
@Slf4j
public class TestController {

    @PostMapping("/test")
    public String test(@RequestBody UserTestReq req){
        log.info("请求的参数:{}",req);
        return String.format("hello,%s",req.getName());
    }


    @PostMapping("/test2")
    public String test2(@RequestBody UserTestReq req){
        log.info("请求的参数:{}",req);
        return String.format("你好,%s",req.getName());
    }


}
